The Client is the centerpiece of the Box SDK. We provide several subclasses of the Client that can be especially useful during development of applications using the SDK.
LoggingClient sets up logging to stdout to help visualize API calls made by the SDK.DeveloperTokenClient sets up auth using a developer token that you can get from the Box Developer Console.DevelopmentClient does both!
In [1]:
from boxsdk import DevelopmentClient
client = DevelopmentClient()
In [2]:
client.user('me').get()
Out[2]:
In [5]:
from boxsdk.exception import BoxAPIException
try:
client.file('1234').get()
except BoxAPIException as e:
pass
As you can see, requests are logged in blue; successful responses in green, error responses in red.
In [ ]: